package com.main;

import com.alibaba.fastjson.JSON;

/**
 * 基本返回
 * Created by 瑱彬 on 2016/8/4.
 */
public class BaseResponse {
    public static String SUCCESS = "1";
    public static String FAIL = "0";

    private String result;
    private String msg;
    private Object data;

    public String getResult() {
        return result;
    }

    public void setResult(String result) {
        this.result = result;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public BaseResponse() {
    }

    public BaseResponse(String result, String msg, Object data) {
        this.result = result;
        this.msg = msg;
        this.data = data;
    }

    /**转换成json*/
    public String toJSON(){
        return JSON.toJSONString(this);
    }
}
